package user_accounts

// 流转类型
// 某些水果类商品/团购存在预付行为 需要冻结一部分押金
// 某些流转行为需要提供原因
// 出入分类应编号序列一致
var AccountFlowType = map[int]map[string]interface{}{
	// 入
	10101: map[string]interface{}{
		"id":          10101,
		"name":        "用户入账",
		"flow_type":   "in",
		"frozen_type": 0,
		"require": map[string]bool{
			"amount":        true,
			"user_id":       true,
			"from_admin_id": false,
			"from_user_id":  false,
			"to_user_id":    false,
			"event_id":      false,
			"order_id":      false,
		},
	},
	10102: map[string]interface{}{
		"id":          10102,
		"name":        "后台理赔",
		"flow_type":   "in",
		"frozen_type": 0,
		"require": map[string]bool{
			"amount":        true,
			"user_id":       true,
			"from_admin_id": true,
			"from_user_id":  false,
			"to_user_id":    false,
			"event_id":      false,
			"order_id":      false,
		},
	},
	10103: map[string]interface{}{
		"id":          10103,
		"name":        "后台流转-入",
		"flow_type":   "in",
		"frozen_type": 0,
		"require": map[string]bool{
			"amount":        true,
			"user_id":       true,
			"from_admin_id": true,
			"from_user_id":  true,
			"to_user_id":    false,
			"event_id":      false,
			"order_id":      false,
		},
	},
	10801: map[string]interface{}{
		"id":          10801,
		"name":        "商品退货",
		"flow_type":   "in",
		"frozen_type": 0,
		"require": map[string]bool{
			"amount":        true,
			"user_id":       true,
			"from_admin_id": false,
			"from_user_id":  false,
			"to_user_id":    false,
			"event_id":      false,
			"order_id":      true,
		},
	},

	10901: map[string]interface{}{
		"id":          10901,
		"name":        "理赔积分",
		"flow_type":   "in",
		"frozen_type": 0,
		"require": map[string]bool{
			"amount":        true,
			"user_id":       true,
			"from_admin_id": true,
			"from_user_id":  false,
			"to_user_id":    false,
			"event_id":      false,
			"order_id":      false,
		},
	},
	10902: map[string]interface{}{
		"id":          10902,
		"name":        "活动积分",
		"flow_type":   "in",
		"frozen_type": 0,
		"require": map[string]bool{
			"amount":        true,
			"user_id":       true,
			"from_admin_id": false,
			"from_user_id":  false,
			"to_user_id":    false,
			"event_id":      true,
			"order_id":      false,
		},
	},

	// 出
	20101: map[string]interface{}{
		"id":          20101,
		"name":        "用户出账",
		"flow_type":   "out",
		"frozen_type": 0,
		"require": map[string]bool{
			"amount":        true,
			"user_id":       true,
			"from_admin_id": false,
			"from_user_id":  false,
			"to_user_id":    false,
			"event_id":      false,
			"order_id":      false,
		},
	},
	20102: map[string]interface{}{
		"id":          20102,
		"name":        "后台扣减",
		"flow_type":   "out",
		"frozen_type": 0,
		"require": map[string]bool{
			"amount":        true,
			"user_id":       true,
			"from_admin_id": true,
			"from_user_id":  false,
			"to_user_id":    false,
			"event_id":      false,
			"order_id":      false,
		},
	},
	20103: map[string]interface{}{
		"id":          20103,
		"name":        "后台流转-出",
		"flow_type":   "out",
		"frozen_type": 0,
		"require": map[string]bool{
			"amount":        true,
			"user_id":       true,
			"from_admin_id": true,
			"from_user_id":  false,
			"to_user_id":    true,
			"event_id":      false,
			"order_id":      false,
		},
	},
	20801: map[string]interface{}{
		"id":          20801,
		"name":        "购买商品",
		"flow_type":   "out",
		"frozen_type": 0,
		"require": map[string]bool{
			"amount":        true,
			"user_id":       true,
			"from_admin_id": false,
			"from_user_id":  false,
			"to_user_id":    false,
			"event_id":      false,
			"order_id":      true,
		},
	},
}
